
* dropping partially treated

est clear

foreach var of varlist participate_index  dem_gov dem_support dem_checks_on_pres dem_institutions {
	
	display " "
	display " "
	display " "
	display "Table A15a: `var'"

	quietly eststo: reg `var' instrument2 c.instrument2#c.W i.birthyear_control##c.W i.locale_gender##c.W c.post2##c.W c.treat2_10_inc##c.W $controls2 if birthyear_control >= 1970 & birthyear_control <= 1997, cluster(locale_3_control)
		
	noisily: lincom instrument2
	noisily: lincom c.instrument2#c.W
	
	quietly: summ `var' if e(sample)
	estadd scalar vmean = r(mean)
	
}	

* region specific trends

foreach var of varlist participate_index dem_gov dem_support dem_checks_on_pres dem_institutions {

	display " "
	display " "
	display " "
	display "Table A15b: `var'"
	
	quietly eststo: reg `var' instrument c.instrument#c.W i.birthyear_control##c.W i.locale_gender##c.W c.post1##c.W c.treat2_10_inc##c.W region* $controls2 if birthyear_control >= 1970 & birthyear_control <= 1997, cluster(locale_3_control)
		
	noisily: lincom instrument 
	noisily: lincom c.instrument#c.W
	
	quietly: summ `var' if e(sample)
	estadd scalar vmean = r(mean)
		
}	


* More stringent birth cutoffs

foreach var of varlist participate_index dem_gov dem_support dem_checks_on_pres dem_institutions {

	display " "
	display " "
	display " "
	display "Table A15c: `var'"
	
	quietly eststo: reg `var' instrument c.instrument#c.W i.birthyear_control##c.W i.locale_gender##c.W c.post1##c.W c.treat2_10_inc##c.W $controls2 if birthyear_control >= 1975 & birthyear_control <= 1997, cluster(locale_3_control)
		
	noisily: lincom instrument 
	noisily: lincom c.instrument#c.W
	
	quietly: summ `var' if e(sample)
	estadd scalar vmean = r(mean)
}	


* 5 year cohorts

foreach var of varlist participate_index dem_gov dem_support dem_checks_on_pres dem_institutions {

	display " "
	display " "
	display " "
	display "Table A15d: `var'"
	
	quietly eststo: reg `var' instrument3 c.instrument3#c.W i.birthyear_control##c.W i.locale_gender##c.W c.post1##c.W c.treat2_inc##c.W $controls2 if birthyear_control >= 1970 & birthyear_control <= 1997, cluster(locale_3_control)
		
	noisily: lincom instrument3 
	noisily: lincom c.instrument3#c.W
	
	quietly: summ `var' if e(sample)
	estadd scalar vmean = r(mean)
	
}	

* Drop top populated places

foreach var of varlist participate_index dem_gov dem_support dem_checks_on_pres dem_institutions {

	display " "
	display " "
	display " "
	display "Table A15e: `var'"
	
	quietly eststo: reg `var' instrument c.instrument#c.W i.birthyear_control##c.W i.locale_gender##c.W c.post1##c.W c.treat2_10_inc##c.W $controls2 if birthyear_control >= 1970 & birthyear_control <= 1997 & pop_quart != 4, cluster(locale_3_control)
		
	noisily: lincom instrument 
	noisily: lincom c.instrument#c.W
	
	quietly: summ `var' if e(sample)
	estadd scalar vmean = r(mean)
	
}	


* Adding age

foreach var of varlist participate_index dem_gov dem_support dem_checks_on_pres dem_institutions {

	display " "
	display " "
	display " "
	display "Table A15f: `var'"
	
	quietly eststo: reg `var' instrument c.instrument#c.W i.birthyear_control##c.W i.locale_gender##c.W c.post1##c.W c.treat2_10_inc##c.W $controls3 if birthyear_control >= 1970 & birthyear_control <= 1997, cluster(locale_3_control)
		
	noisily: lincom instrument 
	noisily: lincom c.instrument#c.W
	
	quietly: summ `var' if e(sample)
	estadd scalar vmean = r(mean)
	
}	


local numbers "& (1) & (2) & (3) & (4) & (5) \\"
local robust1 "\textbf{Dropping partially treated} & \multicolumn{1}{c}{Participate index}   &  \multicolumn{1}{c}{Dem quality index}  &  \multicolumn{1}{c}{Dem support index} &  \multicolumn{1}{c}{Checks on pres index}  &  \multicolumn{1}{c}{Dem inst index} \\  \midrule"
local robust2 "\midrule \\  \textbf{Region-specific trends} &  \multicolumn{1}{c}{Participate index}   &  \multicolumn{1}{c}{Dem quality index}  &  \multicolumn{1}{c}{Dem support index} &  \multicolumn{1}{c}{Checks on pres index}  &  \multicolumn{1}{c}{Dem inst index} \\  \midrule"
local robust3 "\midrule \\  \textbf{Using 1975-1997 sample} &  \multicolumn{1}{c}{Participate index}   &  \multicolumn{1}{c}{Dem quality index}  &  \multicolumn{1}{c}{Dem support index} &  \multicolumn{1}{c}{Checks on pres index}  &  \multicolumn{1}{c}{Dem inst index} \\  \midrule"
local robust4 "\midrule \\  \textbf{5 year cohorts} &  \multicolumn{1}{c}{Participate index}   &  \multicolumn{1}{c}{Dem quality index}  &  \multicolumn{1}{c}{Dem support index} &  \multicolumn{1}{c}{Checks on pres index}  &  \multicolumn{1}{c}{Dem inst index} \\  \midrule"
local robust5 "\midrule \\  \textbf{Drop populated CRs} &  \multicolumn{1}{c}{Participate index}   &  \multicolumn{1}{c}{Dem quality index}  &  \multicolumn{1}{c}{Dem support index} &  \multicolumn{1}{c}{Checks on pres index}  &  \multicolumn{1}{c}{Dem inst index} \\  \midrule"
local robust6 "\midrule \\  \textbf{Adding age as a control} &  \multicolumn{1}{c}{Participate index}   &  \multicolumn{1}{c}{Dem quality index}  &  \multicolumn{1}{c}{Dem support index} &  \multicolumn{1}{c}{Checks on pres index}  &  \multicolumn{1}{c}{Dem inst index} \\  \midrule"
local robust7 "\midrule \\  \textbf{Control for partisanship} &  \multicolumn{1}{c}{Participate index}   &  \multicolumn{1}{c}{Dem quality index}  &  \multicolumn{1}{c}{Dem support index} &  \multicolumn{1}{c}{Checks on pres index}  &  \multicolumn{1}{c}{Dem inst index} \\  \midrule"
local robust8 "\midrule \\  \textbf{Drop year dummies} &  \multicolumn{1}{c}{Participate index}   &  \multicolumn{1}{c}{Dem quality index}  &  \multicolumn{1}{c}{Dem support index} &  \multicolumn{1}{c}{Checks on pres index}  &  \multicolumn{1}{c}{Dem inst index} \\  \midrule"
local gap ""

esttab est1 est2 est3 est4 est5 using "tables/robustness_het.tex", replace b(3) se(3) ar(3) interaction("$\times$") ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`numbers'" "`robust1'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument2 c.instrument2#c.W)

esttab est6 est7 est8 est9 est10 using "tables/robustness_het.tex", append b(3) se(3) ar(3) interaction("$\times$") ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`gap'" "`robust2'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument c.instrument#c.W)

esttab est11 est12 est13 est14 est15 using "tables/robustness_het.tex", append b(3) se(3) ar(3) interaction("$\times$") ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`gap'" "`robust3'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument c.instrument#c.W)

esttab est16 est17 est18 est19 est20 using "tables/robustness_het.tex", append b(3) se(3) ar(3) interaction("$\times$") ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`gap'" "`robust4'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument3 c.instrument3#c.W)

esttab est21 est22 est23 est24 est25 using "tables/robustness_het.tex", append b(3) se(3) ar(3) interaction("$\times$") ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`gap'" "`robust5'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument c.instrument#c.W)

esttab est26 est27 est28 est29 est30 using "tables/robustness_het.tex", append b(3) se(3) ar(3) interaction("$\times$") ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`gap'" "`robust6'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument c.instrument#c.W)

